#libmyc.a:mystdio.o
#	ar -rc $@ $^
#
#%.o:%.c
#	gcc -c $<
#
#.PHONY:output
#output: 
#	mkdir -p lib/include
#	mkdir -p lib/mylib
#	cp *.h lib/include
#	cp *.a lib/mylib
#	tar czf lib.tgz lib 
#
#.PHONY:clean
#clean:
#	rm -rf lib lib.tgz *.o *.a
#

libmyc.so:mystdio.o
	gcc -shared -o $@ $^

mystdio.o:mystdio.c
	gcc -fPIC -c $<

.PHONY:output
output: 
	mkdir -p lib/include
	mkdir -p lib/mylib
	cp -f *.h lib/include
	cp -f *.so lib/mylib
	tar czf lib.tgz lib 

.PHONY:clean
clean:
	rm -rf lib lib.tgz *.o libmyc.so
